package com.mk.settlement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mk.settlement.common.Page;
import com.mk.settlement.mappers.SettlementSchedulerCenterMapper;
import com.mk.settlement.model.SettlementSchedulerCenter;
import com.mk.settlement.service.SettlementSchedulerCenterService;

/**
 * @author futao
 *
 */
@Service
public class SettlementSchedulerCenterServiceImpl implements SettlementSchedulerCenterService {
	
	@Autowired
	private SettlementSchedulerCenterMapper sscMapper;
	
	public Page findData(String taskName,Page page){
		List<SettlementSchedulerCenter> result=sscMapper.findList(taskName,
				page.getBeginTime(),page.getEndTime(),
				page.getStart(), page.getPageSize() );
		int count=sscMapper.selectCount(taskName, page.getBeginTime(),page.getEndTime());
		page.setResult(result);
		page.setTotalRecord( count );
	    page.setTotalPage(page.getTotalPage());
		return page;
	}
	
	public int updateSettlementSchedulerCenter(SettlementSchedulerCenter ssc) {
		return sscMapper.updateSettlementSchedulerCenter(ssc);
	}
	
	public int deleteById(Long id ) {
		return sscMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(SettlementSchedulerCenter ssc) {
		return sscMapper.insert(ssc);
	}
	
	
	
 
	
}